class kerkmeans
{
  public:
    
    
    // class constructor  (there can be more than one, as long as each has a different number of arguments, or argument types)
    inline 		kerkmeans(const mat &in_Kn, const uword in_Ncent);
    inline void 	calc(const uword N_iter);
    inline umat		get_partitions();
    inline vec		get_indices();

    
   
  private:
    
    const mat& 		K;
    const uword 	N_cent;
    const uword		N_data;
    
    umat partitions;
    umat partitions2;
    umat new_partitions;
    umat new_partitions2;
    uvec counts;
    uvec counts2;
    uvec new_counts;
    uvec new_counts2;
    double distortion;
    vec ind_cent;

     

    double err;

    inline void		init_partitions();
    inline void		update_kkmeans();
    inline void		update_kkmeans(ucolvec indices);
    
};